<?php namespace Home\Controller;
class ArctileController extends CommonController{
	
	public function index(){
		
		$count = Db::table("article")->where("is_recycle",0)->count();
		$page = Page::row(6)->desc(array('pre'=>'<', 'next'=>'>','first'=>'首页','end'=>'尾页','unit'=>'个'))->make($count);
		$data = Db::table("article")->where("is_recycle",0)
    	->join("category","cid","=","category_cid")
		->join("article_data","article_aid","=","aid")
		->limit(page::limit())
    	->get();
	
		View::with("page",$page);
		View::with("data",$data);
		
        View::make();
		
	}
	
	
	
}
